Imports GTSSystem.BLL.Carrier
Partial Class GTSWeb_Carrier_Manage
    Inherits System.Web.UI.Page
    Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click
        Dim carrierManager As New GTSSystem.BLL.Carrier
        Try
            carrierManager.AddCarrier(txtCarrierName.Text, Calendar1.SelectedDate, Calendar2.SelectedDate, txtContactName.Text, txtPhone.Text, txtFax.Text, txtEmail.Text, _
            txtStreetAddress.Text, txtCity.Text, txtProvinceState.Text, txtCountry.Text, txtPostalCode.Text, txtCarrierAccountNumber.Text)
            ErrMsg.Text = "Carrier added successfully"
            btnAdd.Visible = False
        Catch ex As Exception
            'ErrMsg.Text = ex.Message
        End Try
    End Sub
    Protected Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        txtCarrierAccountNumber.Text = ""
        txtCarrierName.Text = ""
        txtContactName.Text = ""
        txtPhone.Text = ""
        txtFax.Text = ""
        txtEmail.Text = ""
        txtStreetAddress.Text = ""
        txtCity.Text = ""
        txtProvinceState.Text = ""
        txtCountry.Text = ""
        txtPostalCode.Text = ""
        ErrMsg.Text = ""
        btnAdd.Visible = True
    End Sub
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            Calendar1.SelectedDate = DateTime.Today
            Calendar2.SelectedDate = DateTime.Today.AddYears(2)
            Calendar2.VisibleDate = DateTime.Today.AddYears(2)
        End If
    End Sub
End Class
